<?php $page = basename($_SERVER['PHP_SELF']);?>
    <fb:tabs>       
         <fb:tab-item href="http://apps.new.facebook.com/studybuddies/Courses.php" title="Reach Courses" <?php if ($page == 'Courses.php'):?>selected="true"<?php endif;?>/>       
        <?php if ($_SESSION['reach_veri']==1 || $_SESSION['tutor']==1):?><fb:tab-item href="http://apps.new.facebook.com/studybuddies/Documents.php" title="Course Documents" <?php if ($page == 'Documents.php'):?>selected="true"<?php endif;?>/>  <?php endif;?>       
        <?php if ($_SESSION['reach_veri']==1 || $_SESSION['tutor']==1):?><fb:tab-item href="http://apps.new.facebook.com/studybuddies/Forum.php" title="Course Forums" <?php if ($page == 'Forum.php'):?>selected="true"<?php endif;?>/>  <?php endif;?>       
        <?php if ($_SESSION['reach_veri']==1 || $_SESSION['tutor']==1):?><fb:tab-item href="http://apps.new.facebook.com/studybuddies/Chat.php" title="Course Chat" <?php if ($page == 'Chat.php'):?>selected="true"<?php endif;?>/>  <?php endif;?>
        <fb:tab-item href="http://apps.new.facebook.com/studybuddies/About.php" title="About" <?php if ($page == 'About.php'):?>selected="true"<?php endif;?>/>       
         <fb:tab-item href="http://apps.new.facebook.com/studybuddies/InviteFriends.php" title="Invite Friends" <?php if ($page == 'InviteFriends.php'):?>selected="true"<?php endif;?>/>       
        <?php if ($_SESSION['tutor']==1 || $_SESSION['reach_admin']==1 ):?><fb:tab-item href="http://apps.new.facebook.com/studybuddies/Reach.php" title="Reach" <?php if ($page == 'Reach.php'):?>selected="true"<?php endif;?>/>  <?php endif;?>
   </fb:tabs>
